#include<stdio.h>
int main()
{
	int a;
	scanf("%d", &a);
	printf("%d\n", a % 10);
	int b=a / 10;
	printf("%d\n", b % 10);
	int c = b / 10;
	printf("%d\n", c % 10);
	int d = c / 10;
	printf("%d\n", d % 10);
	int e = d / 10;
	printf("%d\n", e % 10);


	return 0;
}